import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';

/**
 * @param name 路由名称, 必须设置,且不能重名
 * @param meta 路由元信息（路由附带扩展信息）
 * @param redirect 重定向地址, 访问这个路由时,自定进行重定向
 * @param meta.disabled 禁用整个菜单
 * @param meta.title 菜单名称
 * @param meta.icon 菜单图标
 * @param meta.keepAlive 缓存该路由
 * @param meta.sort 排序越小越排前
 *
 * */
const routes: Array<RouteRecordRaw> = [
  {
    path: '/captcha-list',
    component: Layout,
    children: [
      {
        path: '/captcha-list',
        name: 'captcha-list',
        meta: {
          title: '邮箱查询',
        },
        component: () => import('@/views/list/basicList/index.vue'),
      },
    ],
  },
  {
    path: '/orders-list',
    component: Layout,
    children: [
      {
        path: '/orders-list',
        name: 'orders-list',
        meta: {
          title: '订单查询',
        },
        component: () => import('@/views/list/basicList/index.vue'),
      },
    ],
  },
  {
    path: '/mailbox-list',
    component: Layout,
    children: [
      {
        path: '/mailbox-list',
        name: 'mailbox-list',
        meta: {
          title: '综合查询',
        },
        component: () => import('@/views/list/emailBasicList/index.vue'),
      },
    ],
  },
  {
    path: '/picture-list',
    component: Layout,
    children: [
      {
        path: '/picture-list',
        name: 'picture-list',
        meta: {
          title: '图片下载',
        },
        component: () => import('@/views/list/photoDownload/index.vue'),
      },
    ],
  },
  {
    path: '/total-task-pool',
    component: Layout,
    children: [
      {
        path: '/total-task-pool',
        name: 'total-task-pool',
        meta: {
          title: '任务总池',
        },
        component: () => import('@/views/list/totalTaskPool/index.vue'),
      },
    ],
  },
  {
    path: '/personal-pools',
    component: Layout,
    children: [
      {
        path: '/personal-pools',
        name: 'personal-pools',
        meta: {
          title: '个人池',
        },
        component: () => import('@/views/list/personalPools/index.vue'),
      },
    ],
  },
  {
    path: '/task-query-records',
    component: Layout,
    children: [
      {
        path: '/task-query-records',
        name: 'task-query-records',
        meta: {
          title: '任务查询记录',
        },
        component: () => import('@/views/list/taskQueryRecords/index.vue'),
      },
    ],
  },
];

export default routes;
